package com.cy.controller;

import com.cy.model.Alien;
import com.cy.model.Bullet;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * @Author：小小微光
 * @Package：com.cy.controller
 * @Project：Alian
 * @name：CreateObjLis
 * @Date：2023/3/16 0016  20:30
 * @Filename：CreateObjLis
 */
public class CreateObjLis implements ActionListener {
    public int judge = 0;
    @Override
    public void actionPerformed(ActionEvent e) {
        if (judge == 5) {
            GameController.alienList.add(new Alien());
            judge = 0;
        }
        judge++;

        Bullet bullet = new Bullet(GameController.heroPlane.posX,GameController.heroPlane.posY);
        GameController.butlletList.add(bullet);

    }
}
